//
//  UIImageView+TouchImage.m
//  03-UITouch
//
//  Created by 韩旭 on 16/7/18.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "UIImageView+TouchImage.h"

@implementation UIImageView (TouchImage)
+ (UIImageView *)packImageViewFrame:(CGRect)frame imagePhoto:(UIImage *)imagePhoto colorBack:(UIColor *)color action:(SEL)action target:(id)target {
    UIImageView *image = [[UIImageView alloc] initWithFrame:frame];
    image.image = imagePhoto;
    image.backgroundColor = color;
    image.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:target action:action];
    [image addGestureRecognizer:tap];
    return image;
}
@end
